package com.hao.test;

import com.baidu.aip.ocr.AipOcr;
import org.json.JSONObject;

import java.util.HashMap;

/**
 * @author haohj
 * @date 2020-04-13 14:22
 */
public class Sample {
    //设置APPID/AK/SK
    public static final String APP_ID = "19404098";
    public static final String API_KEY = "XpdBZT99HgOWLIr66iVyMlLl";
    public static final String SECRET_KEY = "FFqjLr09t6TQSVAHxb2XBOi172uzErbp";

    public static void main(String[] args) {
        AipOcr client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);

        // 调用接口
        String path = "d://30-21.png";
        JSONObject res = client.basicGeneral(path, new HashMap<String, String>());
        System.out.println(res.toString(2));
    }
}
